﻿/*CREATE TRIGGER [dbo].[Comercializadoras_DeletionTrigger] 
    ON [Comercializadoras] 
    AFTER DELETE 
AS 
SET NOCOUNT ON 
UPDATE [dbo].[Comercializadoras_Tombstone] 
    SET [DeletionDate] = GETUTCDATE() 
    FROM deleted 
    WHERE deleted.[ComercializadoraGuid] = [Comercializadoras_Tombstone].[ComercializadoraGuid] 
IF @@ROWCOUNT = 0 
BEGIN 
    INSERT INTO [dbo].[Comercializadoras_Tombstone] 
    ([ComercializadoraGuid], DeletionDate)
    SELECT [ComercializadoraGuid], GETUTCDATE()
    FROM deleted 
END*/